/// code : 200
/// msg : ""
/// data : ""

class BaseEntity<T> {
  int _code;
  String _msg;
  T _data;

  int get code => _code;
  String get msg => _msg;
  T get data => _data;

  BaseEntity({
      int code, 
      String msg,
    T data}){
    _code = code;
    _msg = msg;
    _data = data;
}

  BaseEntity.fromJson(dynamic json) {
    _code = json["code"];
    _msg = json["msg"];
    _data = json["data"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["code"] = _code;
    map["msg"] = _msg;
    map["data"] = _data;
    return map;
  }

}